home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
Dots & Pixels
/
headers
/
dotcollection.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-29
|
701b
|
39 lines
#pragma once
//
// class dotcollection is used for the rapid appliance of first order optic
// flow. It simply stores a collection of 2D dot positions at 32-bit resolution.
//
class dotcollection
{
public:
dotcollection( int aantaldots);
~dotcollection();
protected:
unsigned int numdots;
//
// coordinates of the dots:
//
short *xcoords;
short *ycoords;
private:
//
// we use 'short_long_hack' to split an unsigned long in two
// signed shorts (the unsigned long being returned by randomizer_step())
//
typedef struct two_shorts
{
short left;
short right;
};
typedef union short_long_hack
{
two_shorts shorties;
unsigned long ulong;
};
};